/**
 * Created by Administrator on 2017/8/8.
 */


    //商品类别


//商品信息
var myShopInfo = $('#my-shop-template').html();
var myShopType = Handlebars.compile(myShopInfo);



//ajax加载商品列表
var id = ''
var ids = window.location.href
var json = ids.split('?')[1];
id =  json.split('=')[1];
console.log(id)


function ajaxGetShopData() {
   
    $.ajax({
        //C.marketInterface
        url: C.interface.jsdetail,
        type: 'get',
        dataType: 'json',
        data: {
            id: id,
  
        },
        success: function (response) {
            if (response.result == 'success') {
                $('.loading').hide();
                var data = response.data;
               if (data.length > 0) {
                    $('#dis-list-vessel').append(myShopType(data));
                    new auiLazyload({
                        errorImage: '../images/error-img.png'
                    });

                }
            }else {
                //alert(response.errorMsg);
             	dialog.tusiError(response.errorMsg);
            }
        }
    })
}



//图片懒加载
$(document).ready(function () {
	ajaxGetShopData();
    new auiLazyload({
        errorImage: '../images/error-img.png'
    });
});




